package com.mini.mysql.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mini.common.EncryptField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * @author zhangxiaobin
 * @title: BusinessStudentInfo
 * @date 2019/10/2711:28
 */
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@DynamicInsert
@DynamicUpdate
public class BusinessStudentInfo implements Serializable {

    private static final long serialVersionUID = 5592908020129767136L;


    @Id
    @ApiModelProperty(value = "订单编号")
    private String orderNo;

    @ApiModelProperty(value = "手机号")
    @EncryptField
    private String phoneNo;

    @ApiModelProperty(value = "小课业务ID")
    private Long miniLessonId;

    @ApiModelProperty(value = "业务线，0加盐业务线 1集团业务线")
    private Integer businessType;

    @ApiModelProperty(value = "课程id")
    private String lessonId;

    @ApiModelProperty(value = "微信的用户唯一标识")
    private String openId;

    @ApiModelProperty(value = "微信id")
    private String wxId;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "性别 0男 1女")
    private Integer sex;

    @ApiModelProperty(value = "学历")
    private String education;

    @ApiModelProperty(value = "学习目标")
    private String learningBjectives;

    @ApiModelProperty(value = "状态 1未加 2已加 ")
    private Integer states;

    @ApiModelProperty(value = "加群状态 0未加 1已加")
    private Integer addWechatGroupState;

    @ApiModelProperty(value = "加群时间")
    private Date addWechatGroupTime;

    @ApiModelProperty(value = "运营专员id")
    private Long teacherId;

    @ApiModelProperty(value = "课程标题")
    private String lessonTitle;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;



    @ApiModelProperty(value = "订单金额")
    private Float orderPrice;

    @ApiModelProperty(value = "订单支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderPayTime;

    @ApiModelProperty(value = "扩展数据，h5表单数据")
    private String extendData;

    @ApiModelProperty(value = "部门id")
    private Long deptId;

    @ApiModelProperty(value = "工作室id")
    private Long workRoomId;

    @ApiModelProperty(value = "工作室名称")
    private String workRoomName;

    @ApiModelProperty(value = "负责人id")
    private Long fzId;

    @ApiModelProperty(value = "负责人名称")
    private String fzName;

    @ApiModelProperty(value = "修改人")
    private Long updateUserId;

    @ApiModelProperty(value = "大课金额")
    private Float bigLessonPrice;

    @ApiModelProperty(value = "广告投放ID")
    private String clickId;

//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
//    private Date installTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date registerTime;

    @ApiModelProperty(value = "安装注册标识 0 否 1是")
    private Integer installState;

    @ApiModelProperty(value = "发送短信 1 发送成功 0发送失败")
    private Integer smsSendState;

    @ApiModelProperty(value = "发送短信失败原因")
    private String smsSendFaildMsg;

    @ApiModelProperty(value = "发送短信结果")
    private String smsSendFaildData;

    @ApiModelProperty(value = "1后端 2前端")
    private Integer syncPlat;

    private Integer mpAuthorizationState;

    private Integer mpAuthorizationOperationType;

    @ApiModelProperty(value = "[2011223]微信昵称")
    private String wechatName;
    @ApiModelProperty(value = "[2011223]微信备注昵称")
    private String wechatNameNote;
    @ApiModelProperty(value = "[20191223]出勤状态-直播:2-连续2天出勤，3-连续3天出勤，4-连续4天出勤，5-连续5天出勤，1-已出勤，0-未出勤")
    private Integer liveAttnState;
    @ApiModelProperty(value = "[20191223]出勤状态-点播:2-连续2天出勤，3-连续3天出勤，4-连续4天出勤，5-连续5天出勤，1-已出勤，0-未出勤")
    private Integer vodAttnState;

    @ApiModelProperty(value = "[20191223]是否打卡：1-是，0-否")
    private Integer hasClockIn;
    @ApiModelProperty(value = "[20191223]是否签到：1-是，0-否")
    private Integer hasMorningReading;
    @ApiModelProperty(value = "[20191223]是否重要学员：1-是，0-否")
    private Integer importantStudent;

    @ApiModelProperty(value = "[20191223]身份证号")
    @EncryptField
    private String identityCard;

    @ApiModelProperty(value = "[20191223]大课班次id")
    private String bigLessonId;

    @ApiModelProperty(value = "[20191223]大课班次名称")
    private String bigLessonName;

    private Date addWechatTime;
    private Integer addWechatChannel;
    private String wehubWxId;

    private Date repeatApplyTime;

    @ApiModelProperty(value = "笛卡尔站点")
    private String descartesSiteId;

    @ApiModelProperty(value = "未支付状态：1-未支付，0-已支付")
    private Integer unPayZeroState;

    @ApiModelProperty(value = "渠道标识")
    private String channelCode;

    @ApiModelProperty(value = "渠道名称")
    private String channelName;

    @ApiModelProperty(value = "学员id")
    private String userId;

    public BusinessStudentInfo(String orderNo) {
        this.orderNo = orderNo;
    }
}
